import request from '@/utils/request'

const standard = {
  // 地方标准列表
  listOld(params) {
    return request.get('/bzh/localStandard/list', {params});
  },
  myListOld(params) {
    return request.get('/bzh/localStandard/myList', {params});
  },
  list(params) {
    return request.get('/bzh/standard/list', {params});
  },
  myList(params) {
    return request.get('/bzh/standard/myList', {params});
  },
  fbList(params) {
    return request.get('/bzh/standard/fbList', {params});
  },
  // 我的地方标准列表
  myProjectList(params) {
    return request.get('/bzh/localStandard/myProjectList', {params});
  },
  projectList(params) {
    return request.get('/bzh/localStandard/projectList', {params});
  },

  // 游客意见调用
  evaluationList(params) {
    return request.get('/bzh/localStandard/evaluationList', {params});
  },
  // 新增地方标准基本信息
  add(data) {
    return request.post('/bzh/localStandard/add', data);
  },
  submit(data) {
    return request.post('/bzh/localStandard/submit', data);
  },
  // 新增其他标准基本信息
  addOther(data) {
    return request.post('/bzh/localStandard/addOther', data);
  },
  // 修改其他标准基本信息
  updateOther(data) {
    return request.post('/bzh/localStandard/updateOther', data);
  },
  // 修改地方标准基本信息
  update(data) {
    return request.post('/bzh/localStandard/update', data);
  },
  // 删除地方标准基本信息
  delete(id) {
    return request.post(`/bzh/localStandard/delete/${id}`)
  },
  // 获取地方标准基本信息详情
  detailById(id) {
    return request.get(`/bzh/standard/detail/${id}`);
  },
  updateStatus(data) {
    return request.post('/bzh/localStandard/updateStatus', data);
  },
  // 报批
  approval(data) {
    return request.post('/bzh/localStandard/approval ', data);
  },
  // 我的报批列表
  myApprovalList(params) {
    return request.get('/bzh/localStandard/myApprovalList', {params})
  },
  // 地方标准报批列表
  approvalList(params) {
    return request.get('/bzh/localStandard/approvalList', {params})
  },
  draftPerson(localId) {
    return request.get(`/bzh/draftPerson/getByLocalId/${localId}`)
  },
  draftUnit(localId) {
    return request.get(`/bzh/draftUnit/getByLocalId/${localId}`)
  },
  standardSystemTree() {
    return request.get(`/bzh/standardSystem/tree`)
  },
  addStandardTree(data) {
    return request.post(`/bzh/standardSystem/add`, data)
  },
  deleteStandardTree(id) {
    return request.post(`/bzh/standardSystem/delete/${id}`)
  },
  editStandardTree(data) {
    return request.post(`/bzh/standardSystem/update`, data)
  },
  standardSystemDetail(id) {
    return request.get(`/bzh/standardSystem/detail/${id}`)
  },
  detailFortourist(id) {
    return request.get(`/bzh/localStandard/detailFortourist/${id}`)
  },
  mySignList(params) {
    return request.get('/bzh/localStandard/mySignList', {params});
  },
  updateForFile(data) {
    return request.post('/bzh/localStandard/updateForFile', data);
  },
  myJoinList(params){
    return request.get('/bzh/standard/myJoinList', {params})
  },
  // 建议表
  addSuggest(data) {
    return request.post('/bzh/standard/add', data);
  },
  updateSuggest(data) {
    return request.post('/bzh/standard/update', data);
  },
  updateBaseSuggest(data) {
    return request.post('/bzh/standard/updateBase', data);
  },
  submitSuggest(data) {
    return request.post('/bzh/standard/submit', data);
  },
  listSuggest(params) {
    return request.get('/bzh/standard/standardList', {params});
  },
  myListSuggest(params) {
    return request.get('/bzh/standard/myStandardList', {params});
  },
  getSuggest(id){
    return request.get(`/bzh/standard/detail/${id}`);
  },
  deleteSuggest(id) {
    return request.post(`/bzh/standard/delete/${id}`)
  },
  // 申报表
  addApply(data) {
    return request.post('/bzh/standardDeclare/add', data);
  },
  updateApply(data) {
    return request.post('/bzh/standardDeclare/update', data);
  },
  updateBaseApply(data) {
    return request.post('/bzh/standardDeclare/updateBase', data);
  },
  submitApply(data) {
    return request.post('/bzh/standardDeclare/submit', data);
  },
  listApply(params) {
    return request.get('/bzh/standard/declareList', {params});
  },
  myListApply(params) {
    return request.get('/bzh/standard/myDeclareList', {params});
  },
  getApply(id){
    return request.get(`/bzh/standardDeclare/detail/${id}`);
  },
  addReply(params){
    return request.post('/bzh/standardDeclare/addReply', params);
  },
  reportTrialAddReply(params){
    return request.post('/bzh/reportTrial/addReply', params);
  },
  submitApprovalAddReply(params){
    return request.post('/bzh/submitApproval/addReply', params);
  },
  getApplyBySuggestId(id){
    return request.get(`/bzh/standardDeclare/getByLocalId/${id}`);
  },
  suggestPdf(id){
    return request.post(`/bzh/standard/createPdfByWindows/${id}`);
  },
  createPdfByWindows(id){
    return request.post(`/bzh/standardDeclare/createPdfByWindows/${id}`);
  },
  // 判定标准是否通过市场监督管理局的审批
  doJdjReview(params) {
    return request.get('/bzh/standard/doJdjReview', {params});
  },
  // 获取地方标准基本信息详情(新)
  getWaitSignDetail(id) {
    return request.get(`/bzh/standard/getWaitSignDetail/${id}`);
  },
}

export default standard;
